import request from '../utils/api'

// 获取结构分析概览数据
export const getStructureOverview = () => {
  return request({
    url: '/structure/overview',
    method: 'get'
  })
}

// 获取设备类型分布统计
export const getDeviceTypeDistribution = () => {
  return request({
    url: '/structure/device-type-distribution',
    method: 'get'
  })
}

// 获取设备状态统计
export const getDeviceStatusStats = () => {
  return request({
    url: '/structure/device-status-stats',
    method: 'get'
  })
}

// 获取信号质量分析
export const getSignalQualityAnalysis = (params) => {
  return request({
    url: '/structure/signal-quality-analysis',
    method: 'get',
    params
  })
}

// 获取任务执行统计
export const getTaskExecutionStats = () => {
  return request({
    url: '/structure/task-execution-stats',
    method: 'get'
  })
}

// 获取优化效果分析
export const getOptimizationEffectAnalysis = (params) => {
  return request({
    url: '/structure/optimization-effect-analysis',
    method: 'get',
    params
  })
}

// 获取设备性能趋势
export const getDevicePerformanceTrend = (deviceId, days = 30) => {
  return request({
    url: `/structure/device-performance-trend/${deviceId}`,
    method: 'get',
    params: { days }
  })
}

// 获取任务类型分布
export const getTaskTypeDistribution = () => {
  return request({
    url: '/structure/task-type-distribution',
    method: 'get'
  })
}

// 获取优化成功率统计
export const getOptimizationSuccessRate = () => {
  return request({
    url: '/structure/optimization-success-rate',
    method: 'get'
  })
}

// 获取网络拓扑结构
export const getNetworkTopology = () => {
  return request({
    url: '/structure/network-topology',
    method: 'get'
  })
}